<?php
/**
 * Created by PhpStorm.
 * User: lee
 * Date: 2019-04-04
 * Time: 15:40
 */

namespace Biz\module\Classes;


use Biz\pockets\serviceTrait\_Delayed;

class TestDelayed
{
    use _Delayed;

    public static function test1()
    {
        $result = self::_delayed("2019-04-04 18:00:00", "我得测试");

        var_dump($result);
        //如果result大于0，说明任务添加成功，并且result=taskId，可以通过撤销任务接口撤销任务
    }

    public static function _delayed_test1($log)
    {
        file_put_contents("/tmp/log.txt", $log, FILE_APPEND);
    }
}